<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学生请假系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
    <link href="css/index.css" rel="stylesheet">
</head>
<body>
<!-- 顶部导航栏 -->
<nav class="top-navbar">
    <div class="nav-brand">
        <img src="images/user.jpg" alt="Logo" class="logo">
        <span class="brand-name">学生请假系统</span>
    </div>
    <div class="nav-tools">
        <div class="theme-toggle">
            <i class="fas fa-sun"></i>
            <label class="switch">
                <input type="checkbox" id="themeToggle">
                <span class="slider"></span>
            </label>
            <i class="fas fa-moon"></i>
        </div>
        <div class="notifications">
            <i class="fas fa-bell"></i>
            <span class="badge">2</span>
        </div>
    </div>
</nav>

<div class="main-container">
    <!-- 侧边栏 -->
    <aside class="sidebar">
        <div class="menu-section">
            <h3>请假管理</h3>
            <ul class="menu-list">
                <li class="menu-item" data-page="leave-request">
                    <i class="fas fa-file-alt"></i>
                    <span>请假申请</span>
                </li>
                <li class="menu-item" data-page="review-leave">
                    <i class="fas fa-history"></i>
                    <span>请假记录</span>
                </li>
            </ul>
        </div>
    </aside>

    <!-- 主要内容区 -->
    <main class="main-content">
        <!-- 面包屑导航 -->
        <div class="breadcrumb-nav">
            <i class="fas fa-home"></i>
            <span>首页</span>
            <i class="fas fa-chevron-right"></i>
            <span id="current-page">欢迎！</span>
        </div>

        <!-- 动态内容区域 -->
        <div id="content-area" class="content-wrapper">
            <%
                String pages = request.getParameter("page");
                if (pages == null || pages.isEmpty()) {  // 如果没有传递"page"参数，显示默认页面
            %>
            <%@ include file="info.jsp" %>
            <%
            } else if ("leave-request".equals(pages)) {
            %>
            <%@ include file="/WEB-INF/views/student/leaveform.jsp" %>
            <%
            } else if ("review-leave".equals(pages)) {
            %>
            <%@ include file="/WEB-INF/views/student/leave_list.jsp" %>
            <%
                }
            %>
        </div>
    </main>
</div>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="js/script.js"></script>

</body>
</html>